<form action="{:url('cms.themes/createFile')}" id="form" method="POST">
    <input type="hidden" name="folder" value="{$filepath}" />
    <div id="actionbar" class="input-group">
        <input class="input w300 readonly fn-tar" disabled type="text" value="{$filepath}" />
        <input class="input w200" name="filename" type="text" value="" />
        <input type="button" value="保存模板" class="button button-green submit" /> 
    </div>
    <textarea id="filecontent" name="filecontent"></textarea>
</form>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/codeide/lib/codemirror.css" />
<script src="__PUBLIC__/admin/codeide/lib/codemirror.js"></script>
<script src="__PUBLIC__/admin/codeide/mode/xml/xml.js"></script>
<script src="__PUBLIC__/admin/codeide/mode/javascript/javascript.js"></script>
<script src="__PUBLIC__/admin/codeide/mode/css/css.js"></script>
<script src="__PUBLIC__/admin/codeide/mode/htmlmixed/htmlmixed.js"></script>
<script src="__PUBLIC__/admin/codeide/addon/edit/matchbrackets.js"></script>
<style type="text/css">.CodeMirror{height:600px;border: 1px solid #f2f6ff;}</style>
<script type="text/javascript">
Do('base', 'layer', 'form', function () {
    CodeMirror.fromTextArea(document.getElementById("filecontent"),{mode: "text/html",indentUnit: 4,lineNumbers: true,matchBrackets: true,autofocus: true});
    $('#form').isForm({types:1});
})
</script>